add debhelper configs (WIP)
authorMichael Ziegler <michael.ziegler@proemion.com>
Thu, 4 Oct 2018 07:10:07 +0000 (09:10 +0200)
committerMichael Ziegler <michael.ziegler@proemion.com>
Thu, 4 Oct 2018 07:10:07 +0000 (09:10 +0200)
14 files changed:
debian/README.Debian [new file with mode: 0644]
debian/README.source [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/rules [new file with mode: 0755]
debian/siridb-server-docs.docs [new file with mode: 0644]
debian/siridb-server.dirs [new file with mode: 0644]
debian/siridb-server.install [new file with mode: 0644]
debian/siridb-server.postinst [new file with mode: 0644]
debian/siridb-server.prerm [new file with mode: 0644]
debian/siridb-server.service [new file with mode: 0644]
debian/source/format [new file with mode: 0644]

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644 (file)
index 0000000..0c9f595
--- /dev/null
@@ -0,0 +1,6 @@
+siridb-server for Debian
+-----------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- unknown <mz1030@mz1030-nb111>  Thu, 04 Oct 2018 08:38:54 +0200
diff --git a/debian/README.source b/debian/README.source
new file mode 100644 (file)
index 0000000..4367beb
--- /dev/null
@@ -0,0 +1,10 @@
+siridb-server for Debian
+-----------------------
+
+<this file describes information about the source package, see Debian policy
+manual section 4.14. You WILL either need to modify or delete this file>
+
+
+
+ -- unknown <mz1030@mz1030-nb111>  Thu, 04 Oct 2018 08:38:54 +0200
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..1170f50
--- /dev/null
@@ -0,0 +1,5 @@
+siridb-server (2.0.29-5) unstable; urgency=medium
+
+  * Initial release
+
+ -- Michael Ziegler <michael.ziegler@proemion.com>  Thu, 04 Oct 2018 08:38:54 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..b4de394
--- /dev/null
@@ -0,0 +1 @@
+11
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..619cade
--- /dev/null
@@ -0,0 +1,22 @@
+Source: siridb-server
+Section: database
+Priority: optional
+Maintainer: Jeroen van der Heijden <jeroen@transceptor.technology>
+Build-Depends: debhelper (>= 11),
+               dh-exec (>=0.3),
+               dh-autoreconf,
+               pkg-config,
+               libpcre2-dev,
+               libuv1-dev,
+               uuid-dev,
+               libcleri-dev
+Standards-Version: 4.1.3
+Homepage: http://siridb.net
+Vcs-Browser: https://github.com/SiriDB/siridb-server
+Vcs-Git: https://github.com/SiriDB/siridb-server.git
+
+Package: siridb-server
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libuv1 (>= 1.8.0), libcleri0
+Description: SiriDB time series database server
+ SiriDB is a fast and scalable time series database.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..f195bb6
--- /dev/null
@@ -0,0 +1,38 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: siridb-server
+Source: <url://example.com>
+
+Files: *
+Copyright: <years> <put author's name and email here>
+           <years> <likewise for another author>
+License: <special license>
+ <Put the license of the package here indented by 1 space>
+ <This follows the format of Description: lines in control file>
+ .
+ <Including paragraphs>
+
+# If you want to use GPL v2 or later for the /debian/* files use 
+# the following clauses, or change it to suit. Delete these two lines
+Files: debian/*
+Copyright: 2018 unknown <mz1030@mz1030-nb111>
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
+# Please avoid picking licenses with terms that are more restrictive than the
+# packaged work, as it may make Debian's contributions unacceptable upstream.
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..5790b53
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+
+%:
+       dh $@
+
+
+# dh_make generated override targets
+# This is example for Cmake (See https://bugs.debian.org/641051 )
+#override_dh_auto_configure:
+#      dh_auto_configure -- #  -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
+
+override_dh_auto_clean:
+       cd Release && make clean
+
+override_dh_auto_build:
+       cd Release && make
diff --git a/debian/siridb-server-docs.docs b/debian/siridb-server-docs.docs
new file mode 100644 (file)
index 0000000..7319041
--- /dev/null
@@ -0,0 +1,2 @@
+README.source
+README.Debian
diff --git a/debian/siridb-server.dirs b/debian/siridb-server.dirs
new file mode 100644 (file)
index 0000000..79cf66d
--- /dev/null
@@ -0,0 +1,2 @@
+/etc/siridb
+/var/lib/siridb
diff --git a/debian/siridb-server.install b/debian/siridb-server.install
new file mode 100644 (file)
index 0000000..9689fa3
--- /dev/null
@@ -0,0 +1,3 @@
+Release/siridb-server      /usr/bin
+siridb.conf                /etc/siridb
+help                       /usr/share/doc/siridb-server
diff --git a/debian/siridb-server.postinst b/debian/siridb-server.postinst
new file mode 100644 (file)
index 0000000..5db62fc
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+
+  configure)
+    # Set up SiriDB Server
+    if which deb-systemd-invoke >/dev/null 2>&1 && pidof systemd >/dev/null 2>&1; then
+        OUTPUT=`deb-systemd-invoke status siridb-server || true`
+        if [[ $OUTPUT == *"running"* ]]; then
+            echo "--------------------------------------------------------------------------------"
+            echo "|  type 'sudo systemctl restart siridb-server.service' to restart SiriDB       |"
+            echo "|  ...or just reboot the machine.                                              |"
+            echo "--------------------------------------------------------------------------------"
+        else
+            echo "Configure systemd service 'siridb-server' ..."
+            cp /usr/lib/siridb/server/systemd/siridb-server.service /lib/systemd/system/siridb-server.service
+            systemctl daemon-reload || true
+            deb-systemd-invoke enable siridb-server 2>/dev/null >/dev/null || true
+            echo "--------------------------------------------------------------------------------"
+            echo "|  type 'sudo systemctl start siridb-server.service' to start SiriDB           |"
+            echo "|  ...or just reboot the machine.                                              |"
+            echo "--------------------------------------------------------------------------------"
+        fi
+    else
+        echo "--------------------------------------------------------------------------------"
+        echo "|  Please use supervisor or another deamon to start SiriDB Server              |"
+        echo "|  It's also possible to start SiriDB manually using 'sudo siridb-server'      |"
+        echo "--------------------------------------------------------------------------------"
+    fi
+  ;;
+
+  abort-upgrade|abort-remove|abort-deconfigure)
+    exit 0
+  ;;
+
+  *)
+    echo "postinst called with unknown argument \`$1'" >&2
+    exit 1
+  ;;
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
\ No newline at end of file
diff --git a/debian/siridb-server.prerm b/debian/siridb-server.prerm
new file mode 100644 (file)
index 0000000..974650d
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+
+  upgrade)
+    exit 0
+  ;;
+
+  remove|deconfigure)
+    # Stop and remove service (when needed)
+    if which deb-systemd-invoke >/dev/null 2>&1 && pidof systemd >/dev/null 2>&1; then
+        echo "Removing systemd service '{package}' ..."
+        deb-systemd-invoke stop {package} 2>/dev/null >/dev/null || true
+        deb-systemd-invoke disable {package} 2>/dev/null >/dev/null || true
+        rm /lib/systemd/system/{package}.service 2>/dev/null >/dev/null || true
+    fi
+  ;;
+
+  failed-upgrade)
+    exit 0
+  ;;
+
+  *)
+    echo "prerm called with unknown argument \`$1'" >&2
+    exit 1
+  ;;
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
\ No newline at end of file
diff --git a/debian/siridb-server.service b/debian/siridb-server.service
new file mode 100644 (file)
index 0000000..47a5701
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=SiriDB Server
+After=network.target
+
+[Service]
+ExecStart=/usr/bin/siridb-server --config /etc/siridb/siridb.conf --log-level warning
+StandardOutput=journal
+LimitNOFILE=65535
+TimeoutStartSec=10
+TimeoutStopSec=300
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/source/format b/debian/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)